package com.mohe.dangjian.filter;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServlet;

import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import com.mohe.dangjian.service.interfaces.IAdmin;

/**
 * 初始化adminUser
 * 
 * @author wxm
 * 
 */
public class InitServlet extends HttpServlet {

	private static final long serialVersionUID = 2535032485378629168L;


	/**
	 * 初始化
	 */
	public void init() {

		ServletContext sc = getServletContext();
		WebApplicationContext ac = WebApplicationContextUtils.getRequiredWebApplicationContext(sc);
		IAdmin adminServ = (IAdmin) ac.getBean("IAdmin");
		if(adminServ == null){
			System.err.println("adminServ == null");
		}
	}
}
